﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShivamEMR.Model.DataInterfaces;
using ShivamEMR.Model;
using ShivamEMR.Model.DataInterfaces.UsersDataInterf;
using ShivamEMR.Data.Repository.UserRepo;
using ShivamEMR.Data.Repository;
using ShivamEMR.Model.Domain;
using ShivamEMR.Model.DataInterfaces.PersonDataInterf;
using ShivamEMR.Data.Repositories.PersonRepo;
using ShivamEMR.Data.Repositories.UserRepo;
using ShivamEMR.Data.Repositories.CompanyRepo;
using ShivamEMR.Data.Repositories.UIRepo;
using ShivamEMR.Data.Repositories.ContactsRepo;
using ShivamEMR.Data.Repositories.DoctorRepo;
using ShivamEMR.Data.Repositories.LocationRepo;
using ShivamEMR.Data.Repositories.MedicalRepo;
using ShivamEMR.Data.Repositories.Accounts;
using ShivamEMR.Data.Repositories.AssetsRepo;
using ShivamEMR.Data.Repositories.CommonRepo;
using ShivamEMR.Data.Repositories.CRMRepo;
using ShivamEMR.Data.Repositories.InventoryRepo;
using ShivamEMR.Data.Repositories.PatientRepo;
using ShivamEMR.Data.Repositories.PharmacyRepo;
using ShivamEMR.Data.Repositories.ServiceRepo;
 


namespace ShivamEMR.Data
{
    public class RepositoryFactory : IRepositoryFactory
    {
         private Context _context;
        
        public RepositoryFactory(IContext context)
        {
            _context = (Context)context;
            //if (_context == null)
            //    _context = new Context();
        }

        #region AccountsModuleRepositories
        public Model.DataInterfaces.AccountsDataInterf.IAccountBalanceRepository GetAccountBalanceRepository()
        {
            return new AccountBalanceRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountGroupRepository GetAccountGroupRepository()
        {
            return new AccountGroupRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountingRuleRepository GetAccountingRuleRepository()
        {
            return new AccountingRuleRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountNatureRepository GetAccountNatureRepository()
        {
            return new AccountNatureRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountRepository GetAccountRepository()
        {
            return new AccountRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountsEntryRepository GetAccountsEntryRepository()
        {
            return new AccountsEntryRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountsPictureRepository GetAccountsPictureRepository()
        {
            return new AccountsPictureRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountsPostingTypeRepository GetAccountsPostingTypeRepository()
        {
            return new AccountsPostingTypeRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountStatusRepository GetAccountStatusRepository()
        {
            return new AccountStatusRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountsTransactionRepository GetAccountsTransactionRepository()
        {
            return new AccountsTransactionRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountsTransactionTypeRepository GetAccountsTransactionTypeRepository()
        {
            return new AccountsTransactionTypeRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountsVoucherRepository GetAccountsVoucherRepository()
        {
            return new AccountsVoucherRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountsVoucherTypeRepository GetAccountsVoucherTypeRepository()
        {
            return new AccountsVoucherTypeRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IAccountTypeRepository GetAccountTypeRepository()
        {
            return new AccountTypeRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IDepreciationRepository GetDepreciationRepository()
        {
            return new DepreciationRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IFinancialYearRepository GetFinancialYearRepository()
        {
            return new FinancialYearRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IMoneyRepository GetMoneyRepository()
        {
            return new MoneyRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IPaymentRepository GetPaymentRepository()
        {
            return new PaymentRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IPaymentStatusRepository GetPaymentStatusRepository()
        {
            return new PaymentStatusRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IPaymentTypeRepository GetPaymentTypeRepository()
        {
            return new PaymentTypeRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IPaymentVoucherRepository GetPaymentVoucherRepository()
        {
            return new PaymentVoucherRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.IReceiptVoucherRepository GetReceiptVoucherRepository()
        {
            return new ReceiptVoucherRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.ISalesVoucherRepository GetSalesVoucherRepository()
        {
            return new SalesVoucherRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.ITaxInformationRepository GetTaxInformationRepository()
        {
            return new TaxInformationRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.ITaxRepository GetTaxRepository()
        {
            return new TaxRepository(_context);
        }

        public Model.DataInterfaces.AccountsDataInterf.ITaxTypeRepository GetTaxTypeRepository()
        {
            return new TaxTypeRepository(_context);
        }
        #endregion

        #region AssetModuleRepositories
        public Model.DataInterfaces.AssetsDataInterf.IAssetGroupRepository GetAssetGroupRepository()
        {
            return new AssetGroupRepository(_context);
        }

        public Model.DataInterfaces.AssetsDataInterf.IAssetPictureRepository GetAssetPictureRepository()
        {
            return new AssetPictureRepository(_context);
        }

        public Model.DataInterfaces.AssetsDataInterf.IAssetRepository GetAssetRepository()
        {
            return new AssetRepository(_context);
        }

        public Model.DataInterfaces.AssetsDataInterf.IAssetStatusRepository GetAssetStatusRepository()
        {
            return new AssetStatusRepository(_context);
        }
        #endregion

        #region CommonModuleRepositories
        public Model.DataInterfaces.CommonDataInterf.IAlertRepository GetAlertRepository()
        {
            return new AlertRepository(_context);
        }

        public Model.DataInterfaces.CommonDataInterf.IDataDictionaryItemStatusRepository GetDataDictionaryItemStatusRepository()
        {
            return new DataDictionaryItemStatusRepository(_context);
        }

        public Model.DataInterfaces.CommonDataInterf.IDataDictionaryRepository GetDataDictionaryRepository()
        {
            return new DataDictionaryRepository(_context);
        }

        public Model.DataInterfaces.CommonDataInterf.IDocumentRepository GetDocumentRepository()
        {
            return new DocumentRepository(_context);
        }

        public Model.DataInterfaces.CommonDataInterf.IUnitRepository GetUnitRepository()
        {
            return new UnitRepository(_context);
        }
        #endregion

        #region CompanyModuleRepositories
        public Model.DataInterfaces.CompanyDataInterf.IEmployeeRepository GetEmployeeRepository()
        {
            return new EmployeeRepository(_context);
        }

        public Model.DataInterfaces.CompanyDataInterf.IEmployeeStatusRepository GetEmployeeStatusRepository()
        {
            return new EmployeeStatusRepository(_context);
        }

        public Model.DataInterfaces.CompanyDataInterf.IEmployeeGroupRepository GetEmployeeGroupRepository()
        {
            return new EmployeeGroupRepository(_context);
        }

        public Model.DataInterfaces.CompanyDataInterf.IBranchRepository GetBranchRepository()
        {
            return new BranchRepository(_context);
        }

        public Model.DataInterfaces.CompanyDataInterf.IBranchGroupRepository GetBranchGroupRepository()
        {
            return new BranchGroupRepository(_context);
        }

        public Model.DataInterfaces.CompanyDataInterf.ICompanyRepository GetCompanyRepository()
        {
            return new CompanyRepository(_context);
        }

        public Model.DataInterfaces.CompanyDataInterf.ICompanyGroupRepository GetCompanyGroupRepository()
        {
            return new CompanyGroupRepository(_context);
        }

        public Model.DataInterfaces.CompanyDataInterf.ICompanyPictureRepository GetCompanyPictureRepository()
        {
            return new CompanyPictureRepository(_context);
        }

        public Model.DataInterfaces.CompanyDataInterf.IDepartmentRepository GetDepartmentRepository()
        {
            return new DepartmentRepository(_context);
        }

        public Model.DataInterfaces.CompanyDataInterf.IDesignationRepository GetDesignationRepository()
        {
            return new DesignationRepository(_context);
        }

        public Model.DataInterfaces.CompanyDataInterf.IEmployeeScheduleRepository GetEmployeeScheduleRepository()
        {
            return new EmployeeScheduleRepository(_context);
        }

        public Model.DataInterfaces.CompanyDataInterf.IScheduleRepository GetScheduleRepository()
        {
            return new ScheduleRepository(_context);
        }

        public Model.DataInterfaces.CompanyDataInterf.IScheduleSatatusRepository GetScheduleStatusRepository()
        {
            return new ScheduleSatatusRepository(_context);
        }

        #endregion
        
        #region ContactModuleRepositories
        public Model.DataInterfaces.ContactsDataInterf.IAddressRepository GetAddressRepository()
        {
            return new AddressRepository(_context);
        }

        public Model.DataInterfaces.ContactsDataInterf.IAddressTypeRepository GetAddressTypeRepository()
        {
            return new AddressTypeRepository(_context);
        }

        public Model.DataInterfaces.ContactsDataInterf.ICityRepository GetCityRepository()
        {
            return new CityRepository(_context);
        }

        public Model.DataInterfaces.ContactsDataInterf.IContactRepository GetContactRepository()
        {
            return new ContactRepository(_context);
        }

        public Model.DataInterfaces.ContactsDataInterf.IContactPictureRepository GetContactPictureRepository()
        {
            return new ContactPictureRepository(_context);
        }

        public Model.DataInterfaces.ContactsDataInterf.IContactTypeRepository GetContactTypeRepository()
        {
            return new ContactTypeRepository(_context);
        }

        public Model.DataInterfaces.ContactsDataInterf.ICountryRepository GetCountryRepository()
        {
            return new CountryRepository(_context);
        }

        public Model.DataInterfaces.ContactsDataInterf.ICultureAndRegionRepository GetCultureAndRegionRepository()
        {
            return new CultureAndRegionRepository(_context);
        }

        public Model.DataInterfaces.ContactsDataInterf.INationalityRepository GetNationalityRepository()
        {
            return new NationalityRepository(_context);
        }

        public Model.DataInterfaces.ContactsDataInterf.ITerritoryRepository GetTerritoryRepository()
        {
            return new TerritoryRepository(_context);
        }
        #endregion

        #region CRMModuleRepositories
        public Model.DataInterfaces.CRMDataInterf.IAnswerDetailRepository GetAnswerDetailRepository()
        {
            return new AnswerDetailRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IAppointmentGroupRepository GetAppointmentGroupRepository()
        {
            return new AppointmentGroupRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IAppointmentRepository GetAppointmentRepository()
        {
            return new AppointmentRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IAppointmentStatusRepository GetAppointmentStatusRepository()
        {
            return new AppointmentStatusRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IAssignmentGroupRepository GetAssignmentGroupRepository()
        {
            return new AssignmentGroupRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IAssignmentRepository GetAssignmentRepository()
        {
            return new AssignmentRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IAssignmentStatusRepository GetAssignmentStatusRepository()
        {
            return new AssignmentStatusRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IEventRepository GetEventRepository()
        {
            return new EventRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IInteractionGroupRepository GetInteractionGroupRepository()
        {
            return new InteractionGroupRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IInteractionRepository GetInteractionRepository()
        {
            return new InteractionRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IMessageGroupRepository GetMessageGroupRepository()
        {
            return new MessageGroupRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IMessageRepository GetMessageRepository()
        {
            return new MessageRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IMessageSatusRepository GetMessageSatusRepository()
        {
            return new MessageSatusRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IMessageTypeRepository GetMessageTypeRepository()
        {
            return new MessageTypeRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IQuestionAnswerRepository GetQuestionAnswerRepository()
        {
            return new QuestionAnswerRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IQuestionGroupRepository GetQuestionGroupRepository()
        {
            return new QuestionGroupRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IQuestionOptionRepository GetQuestionOptionRepository()
        {
            return new QuestionOptionRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IQuestionRepository GetQuestionRepository()
        {
            return new QuestionRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IQuestionStatusRepository GetQuestionStatusRepository()
        {
            return new QuestionStatusRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IQuestionTypeRepository GetQuestionTypeRepository()
        {
            return new QuestionTypeRepository(_context);
        }

        public Model.DataInterfaces.CRMDataInterf.IVenueRepository GetVenueRepository()
        {
            return new VenueRepository(_context);
        } 
        #endregion

        #region DoctorModuleRepositories
        public Model.DataInterfaces.DoctorDataInterf.IDoctorRepository GetDoctorRepository()
        {
            return new DoctorRepository(_context);
        }

        public Model.DataInterfaces.DoctorDataInterf.ISpecialtiesRepository GetSpecialtiesRepository()
        {
            return new SpecialtiesRepository(_context);
        }
        #endregion

        #region InventoryModuleRepositories
        public Model.DataInterfaces.InventoryDataInterf.IBatchRepository GetBatchRepository()
        {
            return new BatchRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IBatchSatusRepository GetBatchSatusRepository()
        {
            return new BatchSatusRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IBatchTypeRepository GetBatchTypeRepository()
        {
            return new BatchTypeRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IInventoryEntryRepository GetInventoryEntryRepository()
        {
            return new InventoryEntryRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IInventoryPostingTypeRepository GetInventoryPostingTypeRepository()
        {
            return new InventoryPostingTypeRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IInventoryTransactionRepository GetInventoryTransactionRepository()
        {
            return new InventoryTransactionRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IInventoryTransactionTypeRepository GetInventoryTransactionTypeRepository()
        {
            return new InventoryTransactionTypeRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IInventoryVoucherRepository GetInventoryVoucherRepository()
        {
            return new InventoryVoucherRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IInventoryVoucherTypeRepository GetInventoryVoucherTypeRepository()
        {
            return new InventoryVoucherTypeRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IInvoiceGroupRepository GetInvoiceGroupRepository()
        {
            return new InvoiceGroupRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IInvoiceItemRepository GetInvoiceItemRepository()
        {
            return new InvoiceItemRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IInvoiceRepository GetInvoiceRepository()
        {
            return new InvoiceRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IInvoiceStatusRepository GetInvoiceStatusRepository()
        {
            return new InvoiceStatusRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IInvoiceTypeRepository GetInvoiceTypeRepository()
        {
            return new InvoiceTypeRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IItemGroupRepository GetItemGroupRepository()
        {
            return new ItemGroupRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IItemPictureRepository GetItemPictureRepository()
        {
            return new ItemPictureRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IItemRepository GetItemRepository()
        {
            return new ItemRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IItemSaleRepository GetItemSaleRepository()
        {
            return new ItemSaleRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IItemStatusRepository GetItemStatusRepository()
        {
            return new ItemStatusRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IItemTypeRepository GetItemTypeRepository()
        {
            return new ItemTypeRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IManufacturerGroupRepository GetManufacturerGroupRepository()
        {
            return new ManufacturerGroupRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IManufacturerRepository GetManufacturerRepository()
        {
            return new ManufacturerRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IOrderGroupRepository GetOrderGroupRepository()
        {
            return new OrderGroupRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IOrderItemRepository GetOrderItemRepository()
        {
            return new OrderItemRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IOrderRepository GetOrderRepository()
        {
            return new OrderRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IOrderStatusRepository GetOrderStatusRepository()
        {
            return new OrderStatusRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IOrderTypeRepository GetOrderTypeRepository()
        {
            return new OrderTypeRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IPackingRepository GetPackingRepository()
        {
            return new PackingRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.IPackingTypeRepository GetPackingTypeRepository()
        {
            return new PackingTypeRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.ISupplierGroupRepository GetSupplierGroupRepository()
        {
            return new SupplierGroupRepository(_context);
        }

        public Model.DataInterfaces.InventoryDataInterf.ISupplierRepository GetSupplierRepository()
        {
            return new SupplierRepository(_context);
        } 
        #endregion

        #region LocationModuleRepositories
        public Model.DataInterfaces.LocationDataInterf.ILocationGroupRepository GetLocationGroupRepository()
        {
            return new LocationGroupRepository(_context);
        }

        public Model.DataInterfaces.LocationDataInterf.ILocationPictureRepository GetLocationPictureRepositry()
        {
            return new LocationPictureRepository(_context);
        }

        public Model.DataInterfaces.LocationDataInterf.ILocationRepository GetLocationRepository()
        {
            return new LocationRepository(_context);
        }
        #endregion

        #region MedicalModuleRepositories
        public Model.DataInterfaces.MedicalDataInterf.IDiseaseCategoryRepository GetDiseaseCategoryRepository()
        {
            return new DiseaseCategoryRepository(_context);
        }

        public Model.DataInterfaces.MedicalDataInterf.IDiseaseGroupRepository GetDiseaseGroupRepository()
        {
            return new DiseaseGroupRepository(_context);
        }

        public Model.DataInterfaces.MedicalDataInterf.IDiseaseRepository GetDiseaseRepository()
        {
            return new DiseaseRepository(_context);
        }

        public Model.DataInterfaces.MedicalDataInterf.IRadiologyAttachmentRepository GetRadiologyAttachmentRepository()
        {
            return new RadiologyAttachmentRepository(_context);
        }

        public Model.DataInterfaces.MedicalDataInterf.IRadiologyGroupRepository GetRadiologyGroupRepository()
        {
            return new RadiologyGroupRepository(_context);
        }

        public Model.DataInterfaces.MedicalDataInterf.IRadiologyItemRepository GetRadiologyItemRepository()
        {
            return new RadiologyItemRepository(_context);
        }

        public Model.DataInterfaces.MedicalDataInterf.IRadiologyRepository GetRadiologyRepository()
        {
            return new RadiologyRepository(_context);
        }

        public Model.DataInterfaces.MedicalDataInterf.ITestRepository GetTestRepository()
        {
            return new TestRepository(_context);
        }

        public Model.DataInterfaces.MedicalDataInterf.ITestGroupRepository GetTestGroupRepository()
        {
            return new TestGroupRepository(_context);
        }

        public Model.DataInterfaces.MedicalDataInterf.ITestItemRepository GetTestItemRepository()
        {
            return new TestItemRepository(_context);
        }

        public Model.DataInterfaces.MedicalDataInterf.ITreatmentTypeRepository GetTreatmentTypeRepository()
        {
            return new TreatmentTypeRepository(_context);
        }
        #endregion

        #region PatientModuleRepositories
        public Model.DataInterfaces.PatientDataInterf.IAdmissionRepository GetAdmissionRepository()
        {
            return new AdmissionRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IAdmissionStatusRepository GetAdmissionStatusRepository()
        {
            return new AdmissionStatusRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IAdmissionTypeRepository GetAdmissionTypeRepository()
        {
            return new AdmissionTypeRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IConsultationRepository GetConsultationRepository()
        {
            return new ConsultationRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IDiagnosisRepository GetDiagnosisRepository()
        {
            return new DiagnosisRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IDiagnosisStatusRepository GetDiagnosisStatusRepository()
        {
            return new DiagnosisStatusRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IDiagnosticItemRepository GetDiagnosticItemRepository()
        {
            return new DiagnosticItemRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IInsuranceCategoryRepository GetInsuranceCategoryRepository()
        {
            return new InsuranceCategoryRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IInsurancePlanRepository GetInsurancePlanRepository()
        {
            return new InsurancePlanRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IInsuranceRepository GetInsuranceRepository()
        {
            return new InsuranceRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IInsuranceStatusRepository GetInsuranceStatusRepository()
        {
            return new InsuranceStatusRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IMedicationRepository GetMedicationRepository()
        {
            return new MedicationRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IMedicationStatusRepository GetMedicationStatusRepository()
        {
            return new MedicationStatusRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientAllergyGroupRepository GetPatientAllergyGroupRepository()
        {
            return new PatientAllergyGroupRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientAllergyRepository GetPatientAllergyRepository()
        {
            return new PatientAllergyRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientGroupRepository GetPatientGroupRepository()
        {
            return new PatientGroupRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientInformationRepository GetPatientInformationRepository()
        {
            return new PatientInformationRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientRadiologyAttachmentRepository GetPatientRadiologyAttachmentRepository()
        {
            return new PatientRadiologyAttachmentRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientRadiologyPictureRepository GetPatientRadiologyPictureRepository()
        {
            return new PatientRadiologyPictureRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientRadiologyRepository GetPatientRadiologyRepository()
        {
            return new PatientRadiologyRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientRepository GetPatientRepository()
        {
            return new PatientRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientRepresentativeRepository GetPatientRepresentativeRepository()
        {
            return new PatientRepresentativeRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientServiceRepository GetPatientServiceRepository()
        {
            return new PatientServiceRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientTestPictureRepository GetPatientTestPictureRepository()
        {
            return new PatientTestPictureRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientTestRepository GetPatientTestRepository()
        {
            return new PatientTestRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.IPatientTreatmentRepository GetPatientTreatmentRepository()
        {
            return new PatientTreatmentRepository(_context);
        }

        public Model.DataInterfaces.PatientDataInterf.ITreatmentStatusRepository GetTreatmentStatusRepository()
        {
            return new TreatmentStatusRepository(_context);
        } 
        #endregion

        #region PersonModuleRepositories
        public ISexRepository GetSexRepository()
        {
            return new SexRepository(_context);
        }

        public IPersonStatusRepository GetPersonStatusRepository()
        {
            return new PersonStatusRepository(_context);
        }

        public IPersonPictureRepository GetPersonPictureRepository()
        {
            return new PersonPictureRepository(_context);
        }

        public IPersonAccountRepository GetPersonAccountRepository()
        {
            return new PersonAccountRepository(_context);
        }

        public IPersonStageRepository GetPersonStageRepository()
        {
            return new PersonStageRepository(_context);
        }

        public IMaritalStatusRepository GetMaritalStatusRepository()
        {
            return new MaritalStatusRepository(_context);
        }

        public IPersonInformationRepository GetPersonInformationRepository()
        {
            return new PersonInformationRepository(_context);
        }
        #endregion             

        #region PharmacyModuleRepository
        public Model.DataInterfaces.PharmacyDataInterf.IDosageRepository GetDosageRepository()
        {
            return new DosageRepository(_context);
        }

        public Model.DataInterfaces.PharmacyDataInterf.IDrugBrandRepository GetDrugBrandRepository()
        {
            return new DrugBrandRepository(_context);
        }

        public Model.DataInterfaces.PharmacyDataInterf.IDrugCategoryRepository GetDrugCategoryRepository()
        {
            return new DrugCategoryRepository(_context);
        }

        public Model.DataInterfaces.PharmacyDataInterf.IDrugClassRepository GetDrugClassRepository()
        {
            return new DrugClassRepository(_context);
        }

        public Model.DataInterfaces.PharmacyDataInterf.IDrugContraIndicationRepository GetDrugContraIndicationRepository()
        {
            return new DrugContraIndicationRepository(_context);
        }

        public Model.DataInterfaces.PharmacyDataInterf.IDrugGenericRepository GetDrugGenericRepository()
        {
            return new DrugGenericRepository(_context);
        }

        public Model.DataInterfaces.PharmacyDataInterf.IDrugGroupRepository GetDrugGroupRepository()
        {
            return new DrugGroupRepository(_context);
        }

        public Model.DataInterfaces.PharmacyDataInterf.IDrugInteractionRepository GetDrugInteractionRepository()
        {
            return new DrugInteractionRepository(_context);
        }

        public Model.DataInterfaces.PharmacyDataInterf.IDrugItemRepository GetDrugItemRepository()
        {
            return new DrugItemRepository(_context);
        }

        public Model.DataInterfaces.PharmacyDataInterf.IDrugPackingRepository GetDrugPackingRepository()
        {
            return new DrugPackingRepository(_context);
        }

        public Model.DataInterfaces.PharmacyDataInterf.IDrugPictureRepository GetDrugPictureRepository()
        {
            return new DrugPictureRepository(_context);
        }

        public Model.DataInterfaces.PharmacyDataInterf.IDrugRepository GetDrugRepository()
        {
            return new DrugRepository(_context);
        } 
        #endregion

        #region ServiceModuleRepository
        public Model.DataInterfaces.ServiceDataInterf.IEMRServiceGroupRepository GetEMRServiceGroupRepository()
        {
            return new EMRServiceGroupRepository(_context);
        }

        public Model.DataInterfaces.ServiceDataInterf.IEMRServicePackageRepository GetEMRServicePackageRepository()
        {
            return new EMRServicePackageRepository(_context);
        }

        public Model.DataInterfaces.ServiceDataInterf.IEMRServicePackageStatusRepository GetEMRServicePackageStatusRepository()
        {
            return new EMRServicePackageStatusRepository(_context);
        }

        public Model.DataInterfaces.ServiceDataInterf.IEMRServicePackageTypeRepository GetEMRServicePackageTypeRepository()
        {
            return new EMRServicePackageTypeRepository(_context);
        }

        public Model.DataInterfaces.ServiceDataInterf.IEMRServiceRepository GetEMRServiceRepository()
        {
            return new EMRServiceRepository(_context);
        }

        public Model.DataInterfaces.ServiceDataInterf.IEMRServiceSchemeRepository GetEMRServiceSchemeRepository()
        {
            return new EMRServiceSchemeRepository(_context);
        }

        public Model.DataInterfaces.ServiceDataInterf.IEMRServiceSchemeTypeRepository GetEMRServiceSchemeTypeRepository()
        {
            return new EMRServiceSchemeTypeRepository(_context);
        }

        public Model.DataInterfaces.ServiceDataInterf.IEMRServiceTypeRepository GetEMRServiceTypeRepository()
        {
            return new EMRServiceTypeRepository(_context);
        }

        public Model.DataInterfaces.ServiceDataInterf.IServiceItemRepository GetServiceItemRepository()
        {
            return new ServiceItemRepository(_context);
        }

        public Model.DataInterfaces.ServiceDataInterf.IServiceItemStatusRepository GetServiceItemStatusRepository()
        {
            return new ServiceItemStatusRepository(_context);
        }

        public Model.DataInterfaces.ServiceDataInterf.IServicePictureRepository GetServicePictureRepository()
        {
            return new ServicePictureRepository(_context);
        }

        public Model.DataInterfaces.ServiceDataInterf.IServicePriceRepository GetServicePriceRepository()
        {
            return new ServicePriceRepository(_context);
        } 
        #endregion

        #region UIModuleRepositories
        //public Model.DataInterfaces.UIDataInterf.IMenuRepository GetMenuRepository()
        //{
        //    return new MenuRepository(_context);
        //}

        //public Model.DataInterfaces.UIDataInterf.IMenuGroupRepository GetMenuGroupRepository()
        //{
        //    return new MenuGroupRepository(_context);
        //}


        public Model.DataInterfaces.UIDataInterf.IUIStyleRepository GetUIStyleRepository()
        {
            return new UIStyleRepository(_context);
        }
        #endregion

        #region UserModuleRepositories
        public IUserRepository GetUserRepository()
        {
            return new UserRepository(_context);
        }

        public IUserRoleRepository GetUserRoleRepository()
        {
            return new UserRoleRepository(_context);
        }

        public IPersonRepository GetPersonRepository()
        {
            return new PersonRepository(_context);
        }

        public IUserTaskRepository GetUserTaskRepository()
        {
            return new UserTaskRepository(_context);
        }

        public IAccessPermissionRepository GetAccessPermissionRepository()
        {
            return new AccessPermissionRepository(_context);
        }


        public IPersonRoleRepository GetPersonRoleRepository()
        {
            return new PersonRoleRepository(_context);
        }

        public IUserRightRepository GetUserRightRepository()
        {
            return new UserRightRepository(_context);
        }

        public IUserRightTypeRepository GetUserRightTypeRepository()
        {
            return new UserRightTypeRepository(_context);
        }

        public IUserRightGroupRepository GetUserRightGroupRepository()
        {
            return new UserRightGroupRepository(_context);
        }

        #endregion


        
    }
}
